3.268 \(\int (c+d x)^2 \csc (a+b x) \sec ^2(a+b x) \, dx\)
Optimal. Leaf size=219 \[ -\frac {2 i d^2 \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^3}+\frac {2 i d^2 \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^3}-\frac {2 d^2 \text {Li}_3\left (-e^{i (a+b x)}\right )}{b^3}+\frac {2 d^2 \text {Li}_3\left (e^{i (a+b x)}\right )}{b^3}+\frac {2 i d (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )}{b^2}+\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \sec (a+b x)}{b}-\frac {2 (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b} \]
[Out]
4*I*d*(d*x+c)*arctan(exp(I*(b*x+a)))/b^2-2*(d*x+c)^2*arctanh(exp(I*(b*x+a)))/b+2*I*d*(d*x+c)*polylog(2,-exp(I*
(b*x+a)))/b^2-2*I*d^2*polylog(2,-I*exp(I*(b*x+a)))/b^3+2*I*d^2*polylog(2,I*exp(I*(b*x+a)))/b^3-2*I*d*(d*x+c)*p
olylog(2,exp(I*(b*x+a)))/b^2-2*d^2*polylog(3,-exp(I*(b*x+a)))/b^3+2*d^2*polylog(3,exp(I*(b*x+a)))/b^3+(d*x+c)^
2*sec(b*x+a)/b
________________________________________________________________________________________
Rubi [A] time = 0.38, antiderivative size = 219, normalized size of antiderivative = 1.00,
number of steps used = 19, number of rules used = 15, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.682, Rules used
= {2622, 321, 207, 4420, 6741, 12, 6742, 6273, 4183, 2531, 2282, 6589, 4181, 2279, 2391}
\[ \frac {2 i d (c+d x) \text {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \text {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {2 i d^2 \text {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^3}+\frac {2 i d^2 \text {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^3}-\frac {2 d^2 \text {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {2 d^2 \text {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}+\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \sec (a+b x)}{b}-\frac {2 (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b} \]
Antiderivative was successfully verified.
[In]
Int[(c + d*x)^2*Csc[a + b*x]*Sec[a + b*x]^2,x]
[Out]
((4*I)*d*(c + d*x)*ArcTan[E^(I*(a + b*x))])/b^2 - (2*(c + d*x)^2*ArcTanh[E^(I*(a + b*x))])/b + ((2*I)*d*(c + d
*x)*PolyLog[2, -E^(I*(a + b*x))])/b^2 - ((2*I)*d^2*PolyLog[2, (-I)*E^(I*(a + b*x))])/b^3 + ((2*I)*d^2*PolyLog[
2, I*E^(I*(a + b*x))])/b^3 - ((2*I)*d*(c + d*x)*PolyLog[2, E^(I*(a + b*x))])/b^2 - (2*d^2*PolyLog[3, -E^(I*(a
+ b*x))])/b^3 + (2*d^2*PolyLog[3, E^(I*(a + b*x))])/b^3 + ((c + d*x)^2*Sec[a + b*x])/b
Rule 12
Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] && !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]
Rule 207
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])
Rule 321
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
c, n, m, p, x]
Rule 2279
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
Rule 2282
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]
Rule 2391
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
e, n}, x] && EqQ[c*d, 1]
Rule 2531
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> -Simp[((
f + g*x)^m*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)])/(b*c*n*Log[F]), x] + Dist[(g*m)/(b*c*n*Log[F]), Int[(f + g*x)
^(m - 1)*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]
Rule 2622
Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
+ 1)/2] && !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])
Rule 4181
Int[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c + d*x)^m*ArcTanh[E
^(I*k*Pi)*E^(I*(e + f*x))])/f, x] + (-Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))],
x], x] + Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e,
f}, x] && IntegerQ[2*k] && IGtQ[m, 0]
Rule 4183
Int[csc[(e_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c + d*x)^m*ArcTanh[E^(I*(e + f*
x))])/f, x] + (-Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 - E^(I*(e + f*x))], x], x] + Dist[(d*m)/f, Int[(c +
d*x)^(m - 1)*Log[1 + E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e, f}, x] && IGtQ[m, 0]
Rule 4420
Int[Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b_.)*(x_)]^(p_.), x_Symbol] :> Modul
e[{u = IntHide[Csc[a + b*x]^n*Sec[a + b*x]^p, x]}, Dist[(c + d*x)^m, u, x] - Dist[d*m, Int[(c + d*x)^(m - 1)*u
, x], x]] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p] && GtQ[m, 0] && NeQ[n, p]
Rule 6273
Int[((a_.) + ArcTanh[u_]*(b_.))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^(m + 1)*(a + b*ArcTan
h[u]))/(d*(m + 1)), x] - Dist[b/(d*(m + 1)), Int[SimplifyIntegrand[((c + d*x)^(m + 1)*D[u, x])/(1 - u^2), x],
x], x] /; FreeQ[{a, b, c, d, m}, x] && NeQ[m, -1] && InverseFunctionFreeQ[u, x] && !FunctionOfQ[(c + d*x)^(m
+ 1), u, x] && FalseQ[PowerVariableExpn[u, m + 1, x]]
Rule 6589
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]
Rule 6741
Int[u_, x_Symbol] :> With[{v = NormalizeIntegrand[u, x]}, Int[v, x] /; v =!= u]
Rule 6742
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]
Rubi steps
\begin {align*} \int (c+d x)^2 \csc (a+b x) \sec ^2(a+b x) \, dx &=-\frac {(c+d x)^2 \tanh ^{-1}(\cos (a+b x))}{b}+\frac {(c+d x)^2 \sec (a+b x)}{b}-(2 d) \int (c+d x) \left (-\frac {\tanh ^{-1}(\cos (a+b x))}{b}+\frac {\sec (a+b x)}{b}\right ) \, dx\\ &=-\frac {(c+d x)^2 \tanh ^{-1}(\cos (a+b x))}{b}+\frac {(c+d x)^2 \sec (a+b x)}{b}-(2 d) \int \frac {(c+d x) \left (-\tanh ^{-1}(\cos (a+b x))+\sec (a+b x)\right )}{b} \, dx\\ &=-\frac {(c+d x)^2 \tanh ^{-1}(\cos (a+b x))}{b}+\frac {(c+d x)^2 \sec (a+b x)}{b}-\frac {(2 d) \int (c+d x) \left (-\tanh ^{-1}(\cos (a+b x))+\sec (a+b x)\right ) \, dx}{b}\\ &=-\frac {(c+d x)^2 \tanh ^{-1}(\cos (a+b x))}{b}+\frac {(c+d x)^2 \sec (a+b x)}{b}-\frac {(2 d) \int \left (-(c+d x) \tanh ^{-1}(\cos (a+b x))+(c+d x) \sec (a+b x)\right ) \, dx}{b}\\ &=-\frac {(c+d x)^2 \tanh ^{-1}(\cos (a+b x))}{b}+\frac {(c+d x)^2 \sec (a+b x)}{b}+\frac {(2 d) \int (c+d x) \tanh ^{-1}(\cos (a+b x)) \, dx}{b}-\frac {(2 d) \int (c+d x) \sec (a+b x) \, dx}{b}\\ &=\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \sec (a+b x)}{b}+\frac {\int b (c+d x)^2 \csc (a+b x) \, dx}{b}+\frac {\left (2 d^2\right ) \int \log \left (1-i e^{i (a+b x)}\right ) \, dx}{b^2}-\frac {\left (2 d^2\right ) \int \log \left (1+i e^{i (a+b x)}\right ) \, dx}{b^2}\\ &=\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \sec (a+b x)}{b}-\frac {\left (2 i d^2\right ) \operatorname {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}+\frac {\left (2 i d^2\right ) \operatorname {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}+\int (c+d x)^2 \csc (a+b x) \, dx\\ &=\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}-\frac {2 (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {2 i d^2 \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^3}+\frac {2 i d^2 \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^3}+\frac {(c+d x)^2 \sec (a+b x)}{b}-\frac {(2 d) \int (c+d x) \log \left (1-e^{i (a+b x)}\right ) \, dx}{b}+\frac {(2 d) \int (c+d x) \log \left (1+e^{i (a+b x)}\right ) \, dx}{b}\\ &=\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}-\frac {2 (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {2 i d (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^2}-\frac {2 i d^2 \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^3}+\frac {2 i d^2 \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^3}-\frac {2 i d (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \sec (a+b x)}{b}-\frac {\left (2 i d^2\right ) \int \text {Li}_2\left (-e^{i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (2 i d^2\right ) \int \text {Li}_2\left (e^{i (a+b x)}\right ) \, dx}{b^2}\\ &=\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}-\frac {2 (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {2 i d (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^2}-\frac {2 i d^2 \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^3}+\frac {2 i d^2 \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^3}-\frac {2 i d (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \sec (a+b x)}{b}-\frac {\left (2 d^2\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}+\frac {\left (2 d^2\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}\\ &=\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}-\frac {2 (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {2 i d (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^2}-\frac {2 i d^2 \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^3}+\frac {2 i d^2 \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^3}-\frac {2 i d (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )}{b^2}-\frac {2 d^2 \text {Li}_3\left (-e^{i (a+b x)}\right )}{b^3}+\frac {2 d^2 \text {Li}_3\left (e^{i (a+b x)}\right )}{b^3}+\frac {(c+d x)^2 \sec (a+b x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 2.47, size = 317, normalized size = 1.45 \[ \frac {b^2 (c+d x)^2 \log \left (1-e^{i (a+b x)}\right )-b^2 (c+d x)^2 \log \left (1+e^{i (a+b x)}\right )+b^2 (c+d x)^2 \sec (a+b x)+2 i d \left (b (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )+i d \text {Li}_3\left (-e^{i (a+b x)}\right )\right )+2 d \left (d \text {Li}_3\left (e^{i (a+b x)}\right )-i b (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )\right )-4 b c d \tanh ^{-1}\left (\cos (a) \tan \left (\frac {b x}{2}\right )+\sin (a)\right )+\frac {2 d^2 \csc (a) \left (i \text {Li}_2\left (-e^{i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )-i \text {Li}_2\left (e^{i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )+\left (b x-\tan ^{-1}(\cot (a))\right ) \left (\log \left (1-e^{i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )-\log \left (1+e^{i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )\right )\right )}{\sqrt {\csc ^2(a)}}-4 d^2 \tan ^{-1}(\cot (a)) \tanh ^{-1}\left (\cos (a) \tan \left (\frac {b x}{2}\right )+\sin (a)\right )}{b^3} \]
Warning: Unable to verify antiderivative.
[In]
Integrate[(c + d*x)^2*Csc[a + b*x]*Sec[a + b*x]^2,x]
[Out]
(-4*b*c*d*ArcTanh[Sin[a] + Cos[a]*Tan[(b*x)/2]] - 4*d^2*ArcTan[Cot[a]]*ArcTanh[Sin[a] + Cos[a]*Tan[(b*x)/2]] +
b^2*(c + d*x)^2*Log[1 - E^(I*(a + b*x))] - b^2*(c + d*x)^2*Log[1 + E^(I*(a + b*x))] + (2*d^2*Csc[a]*((b*x - A
rcTan[Cot[a]])*(Log[1 - E^(I*(b*x - ArcTan[Cot[a]]))] - Log[1 + E^(I*(b*x - ArcTan[Cot[a]]))]) + I*PolyLog[2,
-E^(I*(b*x - ArcTan[Cot[a]]))] - I*PolyLog[2, E^(I*(b*x - ArcTan[Cot[a]]))]))/Sqrt[Csc[a]^2] + (2*I)*d*(b*(c +
d*x)*PolyLog[2, -E^(I*(a + b*x))] + I*d*PolyLog[3, -E^(I*(a + b*x))]) + 2*d*((-I)*b*(c + d*x)*PolyLog[2, E^(I
*(a + b*x))] + d*PolyLog[3, E^(I*(a + b*x))]) + b^2*(c + d*x)^2*Sec[a + b*x])/b^3
________________________________________________________________________________________
fricas [C] time = 0.57, size = 1031, normalized size = 4.71 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((d*x+c)^2*csc(b*x+a)*sec(b*x+a)^2,x, algorithm="fricas")
[Out]
1/2*(2*b^2*d^2*x^2 + 4*b^2*c*d*x + 2*b^2*c^2 + 2*I*d^2*cos(b*x + a)*dilog(I*cos(b*x + a) + sin(b*x + a)) + 2*I
*d^2*cos(b*x + a)*dilog(I*cos(b*x + a) - sin(b*x + a)) - 2*I*d^2*cos(b*x + a)*dilog(-I*cos(b*x + a) + sin(b*x
+ a)) - 2*I*d^2*cos(b*x + a)*dilog(-I*cos(b*x + a) - sin(b*x + a)) + 2*d^2*cos(b*x + a)*polylog(3, cos(b*x + a
) + I*sin(b*x + a)) + 2*d^2*cos(b*x + a)*polylog(3, cos(b*x + a) - I*sin(b*x + a)) - 2*d^2*cos(b*x + a)*polylo
g(3, -cos(b*x + a) + I*sin(b*x + a)) - 2*d^2*cos(b*x + a)*polylog(3, -cos(b*x + a) - I*sin(b*x + a)) + (-2*I*b
*d^2*x - 2*I*b*c*d)*cos(b*x + a)*dilog(cos(b*x + a) + I*sin(b*x + a)) + (2*I*b*d^2*x + 2*I*b*c*d)*cos(b*x + a)
*dilog(cos(b*x + a) - I*sin(b*x + a)) + (-2*I*b*d^2*x - 2*I*b*c*d)*cos(b*x + a)*dilog(-cos(b*x + a) + I*sin(b*
x + a)) + (2*I*b*d^2*x + 2*I*b*c*d)*cos(b*x + a)*dilog(-cos(b*x + a) - I*sin(b*x + a)) - (b^2*d^2*x^2 + 2*b^2*
c*d*x + b^2*c^2)*cos(b*x + a)*log(cos(b*x + a) + I*sin(b*x + a) + 1) - 2*(b*c*d - a*d^2)*cos(b*x + a)*log(cos(
b*x + a) + I*sin(b*x + a) + I) - (b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2)*cos(b*x + a)*log(cos(b*x + a) - I*sin(b
*x + a) + 1) + 2*(b*c*d - a*d^2)*cos(b*x + a)*log(cos(b*x + a) - I*sin(b*x + a) + I) - 2*(b*d^2*x + a*d^2)*cos
(b*x + a)*log(I*cos(b*x + a) + sin(b*x + a) + 1) + 2*(b*d^2*x + a*d^2)*cos(b*x + a)*log(I*cos(b*x + a) - sin(b
*x + a) + 1) - 2*(b*d^2*x + a*d^2)*cos(b*x + a)*log(-I*cos(b*x + a) + sin(b*x + a) + 1) + 2*(b*d^2*x + a*d^2)*
cos(b*x + a)*log(-I*cos(b*x + a) - sin(b*x + a) + 1) + (b^2*c^2 - 2*a*b*c*d + a^2*d^2)*cos(b*x + a)*log(-1/2*c
os(b*x + a) + 1/2*I*sin(b*x + a) + 1/2) + (b^2*c^2 - 2*a*b*c*d + a^2*d^2)*cos(b*x + a)*log(-1/2*cos(b*x + a) -
1/2*I*sin(b*x + a) + 1/2) + (b^2*d^2*x^2 + 2*b^2*c*d*x + 2*a*b*c*d - a^2*d^2)*cos(b*x + a)*log(-cos(b*x + a)
+ I*sin(b*x + a) + 1) - 2*(b*c*d - a*d^2)*cos(b*x + a)*log(-cos(b*x + a) + I*sin(b*x + a) + I) + (b^2*d^2*x^2
+ 2*b^2*c*d*x + 2*a*b*c*d - a^2*d^2)*cos(b*x + a)*log(-cos(b*x + a) - I*sin(b*x + a) + 1) + 2*(b*c*d - a*d^2)*
cos(b*x + a)*log(-cos(b*x + a) - I*sin(b*x + a) + I))/(b^3*cos(b*x + a))
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )}^{2} \csc \left (b x + a\right ) \sec \left (b x + a\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((d*x+c)^2*csc(b*x+a)*sec(b*x+a)^2,x, algorithm="giac")
[Out]
integrate((d*x + c)^2*csc(b*x + a)*sec(b*x + a)^2, x)
________________________________________________________________________________________
maple [B] time = 0.27, size = 568, normalized size = 2.59 \[ \frac {d^{2} a^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b^{3}}+\frac {d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b}-\frac {d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a^{2}}{b^{3}}-\frac {d^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x^{2}}{b}+\frac {2 d^{2} \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {2 d^{2} \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{3}}-\frac {2 d^{2} \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}-\frac {2 d^{2} \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{3}}+\frac {2 i d^{2} \dilog \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {2 i d^{2} \dilog \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {c^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b}-\frac {c^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )}{b}-\frac {2 d^{2} \polylog \left (3, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {2 d^{2} \polylog \left (3, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {2 c d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}+\frac {2 c d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}-\frac {2 c d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b}-\frac {2 c d a \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b^{2}}+\frac {2 i d^{2} \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}-\frac {2 i d^{2} \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {2 i c d \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {2 i c d \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {4 i d c \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {4 i d^{2} a \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {2 \,{\mathrm e}^{i \left (b x +a \right )} \left (d^{2} x^{2}+2 c d x +c^{2}\right )}{b \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((d*x+c)^2*csc(b*x+a)*sec(b*x+a)^2,x)
[Out]
1/b^3*d^2*a^2*ln(exp(I*(b*x+a))-1)+1/b*d^2*ln(1-exp(I*(b*x+a)))*x^2-1/b^3*d^2*ln(1-exp(I*(b*x+a)))*a^2-1/b*d^2
*ln(exp(I*(b*x+a))+1)*x^2-2*d^2*polylog(3,-exp(I*(b*x+a)))/b^3+2*d^2*polylog(3,exp(I*(b*x+a)))/b^3-2/b^3*d^2*l
n(1-I*exp(I*(b*x+a)))*a+2*I/b^3*d^2*dilog(1-I*exp(I*(b*x+a)))-2*I/b^3*d^2*dilog(1+I*exp(I*(b*x+a)))+2/b^2*d^2*
ln(1+I*exp(I*(b*x+a)))*x+2/b^3*d^2*ln(1+I*exp(I*(b*x+a)))*a-2/b^2*d^2*ln(1-I*exp(I*(b*x+a)))*x+1/b*c^2*ln(exp(
I*(b*x+a))-1)-1/b*c^2*ln(exp(I*(b*x+a))+1)+2/b*c*d*ln(1-exp(I*(b*x+a)))*x+2/b^2*c*d*ln(1-exp(I*(b*x+a)))*a-2/b
*c*d*ln(exp(I*(b*x+a))+1)*x-2/b^2*c*d*a*ln(exp(I*(b*x+a))-1)-2*I/b^2*d^2*polylog(2,exp(I*(b*x+a)))*x-2*I/b^2*c
*d*polylog(2,exp(I*(b*x+a)))+4*I*d/b^2*c*arctan(exp(I*(b*x+a)))-4*I*d^2/b^3*a*arctan(exp(I*(b*x+a)))+2*exp(I*(
b*x+a))*(d^2*x^2+2*c*d*x+c^2)/b/(1+exp(2*I*(b*x+a)))+2*I/b^2*d^2*polylog(2,-exp(I*(b*x+a)))*x+2*I/b^2*c*d*poly
log(2,-exp(I*(b*x+a)))
________________________________________________________________________________________
maxima [B] time = 0.69, size = 1598, normalized size = 7.30 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((d*x+c)^2*csc(b*x+a)*sec(b*x+a)^2,x, algorithm="maxima")
[Out]
1/2*(c^2*(2/cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b*x + a) - 1)) - 2*a*c*d*(2/cos(b*x + a) - log(cos(
b*x + a) + 1) + log(cos(b*x + a) - 1))/b + a^2*d^2*(2/cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b*x + a)
- 1))/b^2 + 2*((4*b*c*d + 4*(b*x + a)*d^2 - 4*a*d^2 + 4*(b*c*d + (b*x + a)*d^2 - a*d^2)*cos(2*b*x + 2*a) - (-4
*I*b*c*d - 4*I*(b*x + a)*d^2 + 4*I*a*d^2)*sin(2*b*x + 2*a))*arctan2(cos(b*x + a), sin(b*x + a) + 1) + (4*b*c*d
+ 4*(b*x + a)*d^2 - 4*a*d^2 + 4*(b*c*d + (b*x + a)*d^2 - a*d^2)*cos(2*b*x + 2*a) - (-4*I*b*c*d - 4*I*(b*x + a
)*d^2 + 4*I*a*d^2)*sin(2*b*x + 2*a))*arctan2(cos(b*x + a), -sin(b*x + a) + 1) - (2*(b*x + a)^2*d^2 + 4*(b*c*d
- a*d^2)*(b*x + a) + 2*((b*x + a)^2*d^2 + 2*(b*c*d - a*d^2)*(b*x + a))*cos(2*b*x + 2*a) + (2*I*(b*x + a)^2*d^2
+ (4*I*b*c*d - 4*I*a*d^2)*(b*x + a))*sin(2*b*x + 2*a))*arctan2(sin(b*x + a), cos(b*x + a) + 1) - (2*(b*x + a)
^2*d^2 + 4*(b*c*d - a*d^2)*(b*x + a) + 2*((b*x + a)^2*d^2 + 2*(b*c*d - a*d^2)*(b*x + a))*cos(2*b*x + 2*a) + (2
*I*(b*x + a)^2*d^2 + (4*I*b*c*d - 4*I*a*d^2)*(b*x + a))*sin(2*b*x + 2*a))*arctan2(sin(b*x + a), -cos(b*x + a)
+ 1) - (4*I*(b*x + a)^2*d^2 + (8*I*b*c*d - 8*I*a*d^2)*(b*x + a))*cos(b*x + a) + 4*(d^2*cos(2*b*x + 2*a) + I*d^
2*sin(2*b*x + 2*a) + d^2)*dilog(I*e^(I*b*x + I*a)) - 4*(d^2*cos(2*b*x + 2*a) + I*d^2*sin(2*b*x + 2*a) + d^2)*d
ilog(-I*e^(I*b*x + I*a)) + (4*b*c*d + 4*(b*x + a)*d^2 - 4*a*d^2 + 4*(b*c*d + (b*x + a)*d^2 - a*d^2)*cos(2*b*x
+ 2*a) - (-4*I*b*c*d - 4*I*(b*x + a)*d^2 + 4*I*a*d^2)*sin(2*b*x + 2*a))*dilog(-e^(I*b*x + I*a)) - (4*b*c*d + 4
*(b*x + a)*d^2 - 4*a*d^2 + 4*(b*c*d + (b*x + a)*d^2 - a*d^2)*cos(2*b*x + 2*a) + (4*I*b*c*d + 4*I*(b*x + a)*d^2
- 4*I*a*d^2)*sin(2*b*x + 2*a))*dilog(e^(I*b*x + I*a)) - (-I*(b*x + a)^2*d^2 + (-2*I*b*c*d + 2*I*a*d^2)*(b*x +
a) + (-I*(b*x + a)^2*d^2 + (-2*I*b*c*d + 2*I*a*d^2)*(b*x + a))*cos(2*b*x + 2*a) + ((b*x + a)^2*d^2 + 2*(b*c*d
- a*d^2)*(b*x + a))*sin(2*b*x + 2*a))*log(cos(b*x + a)^2 + sin(b*x + a)^2 + 2*cos(b*x + a) + 1) - (I*(b*x + a
)^2*d^2 + (2*I*b*c*d - 2*I*a*d^2)*(b*x + a) + (I*(b*x + a)^2*d^2 + (2*I*b*c*d - 2*I*a*d^2)*(b*x + a))*cos(2*b*
x + 2*a) - ((b*x + a)^2*d^2 + 2*(b*c*d - a*d^2)*(b*x + a))*sin(2*b*x + 2*a))*log(cos(b*x + a)^2 + sin(b*x + a)
^2 - 2*cos(b*x + a) + 1) - (-2*I*b*c*d - 2*I*(b*x + a)*d^2 + 2*I*a*d^2 + (-2*I*b*c*d - 2*I*(b*x + a)*d^2 + 2*I
*a*d^2)*cos(2*b*x + 2*a) + 2*(b*c*d + (b*x + a)*d^2 - a*d^2)*sin(2*b*x + 2*a))*log(cos(b*x + a)^2 + sin(b*x +
a)^2 + 2*sin(b*x + a) + 1) - (2*I*b*c*d + 2*I*(b*x + a)*d^2 - 2*I*a*d^2 + (2*I*b*c*d + 2*I*(b*x + a)*d^2 - 2*I
*a*d^2)*cos(2*b*x + 2*a) - 2*(b*c*d + (b*x + a)*d^2 - a*d^2)*sin(2*b*x + 2*a))*log(cos(b*x + a)^2 + sin(b*x +
a)^2 - 2*sin(b*x + a) + 1) - (-4*I*d^2*cos(2*b*x + 2*a) + 4*d^2*sin(2*b*x + 2*a) - 4*I*d^2)*polylog(3, -e^(I*b
*x + I*a)) - (4*I*d^2*cos(2*b*x + 2*a) - 4*d^2*sin(2*b*x + 2*a) + 4*I*d^2)*polylog(3, e^(I*b*x + I*a)) + 4*((b
*x + a)^2*d^2 + 2*(b*c*d - a*d^2)*(b*x + a))*sin(b*x + a))/(-2*I*b^2*cos(2*b*x + 2*a) + 2*b^2*sin(2*b*x + 2*a)
- 2*I*b^2))/b
________________________________________________________________________________________
mupad [F(-1)] time = 0.00, size = -1, normalized size = -0.00 \[ \text {Hanged} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((c + d*x)^2/(cos(a + b*x)^2*sin(a + b*x)),x)
[Out]
\text{Hanged}
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right )^{2} \csc {\left (a + b x \right )} \sec ^{2}{\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((d*x+c)**2*csc(b*x+a)*sec(b*x+a)**2,x)
[Out]
Integral((c + d*x)**2*csc(a + b*x)*sec(a + b*x)**2, x)
________________________________________________________________________________________